import request from "@/utils/request";

const BASE_URL = '/study'


export const getTodayStudyWordCount = () => {
    return request.get(`${BASE_URL}/getTodayStudyWordCount?uId=${sessionStorage.getItem("user")}`);
}

export const getAllStudyWordCount = () => {
    return request.get(`${BASE_URL}/getAllStudyWordCount?uId=${sessionStorage.getItem("user")}`);
}

export const learning = (limit: number) => {
    return request.get(`${BASE_URL}/learning?uId=${sessionStorage.getItem("user")}&limit=${limit}`)
}

export const study = (data: FormData) => {
    return request.post(`${BASE_URL}/study` , data);
}

export const getAllStudyDate = (id : number) => {
    return request.get(`${BASE_URL}/getAllStudyDate?id=${id}`)
}